﻿@model LastPostModel
@using Nop.Core.Infrastructure;
@using Nop.Web.Models.Boards;
@using Nop.Services.Customers;
@using Nop.Services.Forums;
@using Nop.Services.Helpers;
@using Nop.Services.Seo;
@if (Model.Id > 0)
{
    <div class="last-post">
        <div class="createdon">@Model.PostCreatedOnStr</div>
        @if (Model.ShowTopic)
        {
            <div>
                <text>@T("Forum.In"):</text>
                @Html.RouteLink(Model.ForumTopicSubject, "TopicSlug", new { id = Model.ForumTopicId, slug = Model.ForumTopicSeName })
            </div>
        }
        @if (Model.CustomerId > 0)
        {
            <div>
                @if (Model.AllowViewingProfiles && !Model.IsCustomerGuest)
                {
                    @T("Forum.By")<text>:</text> @Html.RouteLink(Model.CustomerName, "CustomerProfile", new { Id = Model.CustomerId })
                }
                else
                {
                    @T("Forum.By")<text>:</text> @Model.CustomerName
                }
            </div>
        }
    </div>
}
else
{
    <div class="nopost">
        @T("Forum.NoPosts")
    </div>
}
